<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = [12,23,342,32];
        for(let i=0;i<arr.length;i++){
            console.log(arr[i]);
        }

        console.log(...arr);
        //求最大值
        console.log(Math.max.apply(null,arr));
        console.log(Math.max(...arr));

        //合并数组
        var arr1 = [12,34,234,12];
        var arr2 = [543,564,786,65];
        console.log(arr1.concat(arr2));

        console.log([...arr1,...arr2]);
    </script>
</body>
</html>